<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	import="com.wavecoler.professor.dao.TeamDAO, com.wavecoler.professor.objects.Team, com.wavecoler.professor.objects.User, java.util.List"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>List of Teams</title>
</head>
<body>
	<%
	List<Team> teams = TeamDAO.getTeamsList();
   for(int i = 0; i < teams.size(); i++){
	  int number = i+1;
	  Team team = teams.get(i);
%>
	Team #
	<%= number %>
	<br /> Group name:
	<%= team.getTeamName().toString()%>
	<br>The members of this group are:
	<% List<User> participants = team.getUsers();
      for(int j = 0; j < participants.size(); j++) {
      	out.print(participants.get(j).getFirstName().trim() + ", ");
      }
      %>
	<br />
	<br />
	<% }%>
</body>
</html>